local AddonName, Addon = ...

local L = Addon.L

Addon.Version = GetAddOnMetadata(AddonName, "Version")

Addon.Config = {
    IsEnable = true,
    SelectSound = "yuer",
    OutputChannel = "Master",
    TestFile = "\\Skeram_Interrupt.mp3"
}

Addon.CharacterList = {
    [L["SOUND_XIAOTONG"]] = "xiaotong",
    [L["SOUND_YUER"]] = "yuer",
    [L["SOUND_MACHINE"]] = "machine",
}

--注册Frames
Addon.Frame = CreateFrame("Frame", AddonName .. "Frame")
Addon.Frame:Hide()
Addon.Panel = CreateFrame("Frame", AddonName .. "Panel")
Addon.Panel:Hide()
Addon.ScrollFrame = CreateFrame("ScrollFrame", nil, UIParent, "UIPanelScrollFrameTemplate")
Addon.ScrollFrame:Hide()


SLASH_SoundTAQCMD1 = "/SoundTAQ"
SLASH_SoundTAQCMD2 = "/staq"

SlashCmdList["SoundTAQCMD"] = function(msg)
	if not UnitAffectingCombat("player") then
        InterfaceOptionsFrame_OpenToCategory("SoundTAQ")
        InterfaceOptionsFrame_OpenToCategory("SoundTAQ")
    else
        print(L["SoundTAQ_NOCOMBAT"])
    end
end
